import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
    {
    title: '开始时间',
    align:"center",
    dataIndex: 'start'
   },
   {
    title: '结束时间',
    align:"center",
    dataIndex: 'end'
   },
   {
    title: '容纳人数',
    align:"center",
    dataIndex: 'contain'
   },
   {
    title: '最大单次预约限制人数',
    align:"center",
    dataIndex: 'maxApply'
   },
   {
    title: '当前已预约人数',
    align:"center",
    dataIndex: 'currApply'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '开始时间',
    field: 'start',
    component: 'Input',
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入开始时间!'},
          ];
     },
  },
  {
    label: '结束时间',
    field: 'end',
    component: 'Input',
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入结束时间!'},
          ];
     },
  },
  {
    label: '容纳人数',
    field: 'contain',
    component: 'InputNumber',
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入容纳人数!'},
          ];
     },
  },
  {
    label: '最大单次预约限制人数',
    field: 'maxApply',
    component: 'InputNumber',
  },
  {
    label: '当前已预约人数',
    field: 'currApply',
    component: 'InputNumber',
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入当前已预约人数!'},
          ];
     },
  },
];
